package com.amqr.movetest.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.RelativeLayout;

/**
 * User: LJM
 * Date&Time: 2017-04-24 & 16:25
 * Describe: Describe Text
 */
public class MyRecyclerLayout extends RelativeLayout {



    private boolean intercept = false;
    private boolean dispatch = false;

    public MyRecyclerLayout(Context context) {
        super(context);
    }

    public MyRecyclerLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyRecyclerLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }
    
    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        //return super.onInterceptTouchEvent(ev);
        if(this.intercept){
            return true;
        }else{
            return  false; //默认
        }
    }

    public void setInterceptState(boolean intercept) {
        this.intercept = intercept;
    }
    public void setDispatchState(boolean dispatch) {
        this.dispatch = dispatch;
    }




}
